/**
 * Created by Thyiad on 2017/11/15.
 */
import Mock from 'mockjs';
import * as api from '../constants/api';
import mockApi from './mockApi';

Mock.setup({
  timeout: '350-600',   // 延时350-600ms响应
  // timeout: '850-1600',   // 延时350-600ms响应
})

// mockApi
Mock.mock(api.LOGIN,  mockApi.login);
Mock.mock(api.REGISTER,  mockApi.register);
Mock.mock(api.GET_COMPANYINFO, mockApi.getCompanyInfo);
Mock.mock(api.EDIT_COMPANYINFO, mockApi.editCompanyInfo);

Mock.mock(api.GET_CARLIST, mockApi.getCarList);
Mock.mock(api.ADD_CAR, mockApi.addCar);
Mock.mock(api.EDIT_CAR, mockApi.editCar);
Mock.mock(api.DELETE_CAR, mockApi.deleteCar);

Mock.mock(api.GET_DRIVERLIST, mockApi.getDriverList);
Mock.mock(api.ADD_DRIVER, mockApi.addDriver);
Mock.mock(api.EDIT_DRIVER, mockApi.editDriver);
Mock.mock(api.DELETE_DRIVER, mockApi.deleteDriver);

Mock.mock(api.UPLOAD, mockApi.upload);
Mock.mock(api.GET_CREDITINFO, mockApi.getCreditInfo);
Mock.mock(api.GET_ORDERLIST, mockApi.getOrderList);
Mock.mock(api.GET_CHECKLIST, mockApi.getCheckList);
Mock.mock(api.GET_MSG, mockApi.getMsg);

export default Mock;

